==
== HOW TO USE THE TROPHY 1.0 PLUG-IN FOR 4D APPLICATIONS
==


Why a plug-in for 4D ?

The plug-in <TrophyPlugin> allows any application based on 4D to launch the digital imaging software <Trophy Mac>.  It locates the application automatically on the hard drive then creates the event necessary the launch.


Compatibility :

This plug-in is designed to be used with Mac computers. It is compatible with Mac OS 9.x et 10.x operating systems.


Installation :

The plug-in must be installed into the < Mac 4DX> directory. In case of single station installation, this directory must into the folder that contains the 4D core. In case of network installation, this directory must be into the folder that contains the 4D server. In that last case, the 4D server acts as an application server and as a plug-in server. 


How to operate the plug-in ?

The application <Trophy Mac> requires the following parameters : Patient first name, patient last name, Doctor's name (or references) and the path that indicates where to store and retrieve images that belong to the patient.

These parameters are sent as arguments of the plug-in command line <LaunchTRImage>. Parameters must be sent in the following order :

	1/ patient images directorys path, 
	2/ patient last name, 
	3/ patient first name, 
	4/ doctor's name.

Example with 4D v6.8, the command line is as shown :

$ErrCode:=LaunchTRImage ($directory_path;$patient_last_name;$patient_first_name;$doctor_name)

Note : $ states for local variable

Each parameter can be up to 255 bytes long. The patient images directory must be an absolute path (not relative). The middle directories that describe the complete path must be seprated with ":" as show :
example : Server HD:Trophy Data:John Smith 
here <Server HD> can be a local drive or a shared drive on the network


If the launch did not work :

In case of failure during the launch of the <Trophy Mac> application, the plug-in returns the following error codes :

	-> -1 = Application not found, 
	-> -2 = Application already running, 
	-> -3 = Internal plug-in error (should not happen), 
	-> -4 = unable to find the image patient directory.
